//
//  CLExtensionSecurity.h
//
//  Created by Charlie on 15/6/15.
//  Copyright (c) 2015年 . All rights reserved.
//

#import <Foundation/Foundation.h>


#pragma mark - Data Security

@interface NSData (CLSecurity)

#pragma mark - 安全哈希算法

/// sha1加密
- (NSString *)sha1;

#pragma mark - RSA公钥加密算法

/// RSA公钥加密算法 加密
- (NSData *)encryptRSAWithPublicKey:(SecKeyRef)publicKey maxPlainLen:(size_t)maxPlainLen;

@end

#pragma mark - String Security

@interface NSString (CLSecurity)

/// MD5加密
- (NSString *)md5;

/// sha1加密
- (NSString *)sha1;

/// RSA公钥加密算法 加密
- (NSString *)encryptRSAWithPublicKey:(SecKeyRef)publicKey maxPlainLen:(size_t)maxPlainLen;

@end
